POV-Ray : Newsgroups : povray.unofficial.patches : bicubic interpolation patch : bicubic interpolation patch Server Time
28 Jun 2024 15:23:39 EDT (-0400)
  bicubic interpolation patch  
From: Lutz-Peter Hooge
Date: 10 Jun 2003 20:30:43
Message: <3ee67833$1@news.povray.org>
I posted a patch adding bicubic interpolation to image_maps
to .binaries.programming.

A few things to discuss:

1) It is enabled with "interpolation 3"
In image.h this is/was mapped to CUBIC_SPLINE, but wasn't implemented
until now. Now the question is: is bicubic interpolation the same as 
cubic spline interpolation? Should interpolation 3 be used for 
bicubic, or should it be leaved reserved for some other interpolation?

2) cubic interpolation can possibly return values outside the
[0..1] range.
Do these values need to be clipped? IMHO not for values >1 (colors >1
are allowed anyway), but what about <0?
Do I have to worry about this, or are the values already clipped 
somewhere else where needed?

3) Currently the matrix with determines the coefficients for the
cubic interpolation function is hardcoded. Would it make sense
to let the user specifiy a different one?

for example like this:
image_map
{
  sys "somepic"
  interpolation 3
  matrix <-0.5,  1.5, -1.5,  0.5,
           1.0, -2.5,  2.0, -0.5,
          -0.5,  0.0,  0.5,  0.0,
           0.0,  1.0,  0.0,  0.0>
}

Lutz-Peter


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.